Eecient Inference of Object Types
نویسنده
چکیده
Abadi and Cardelli have recently investigated a calculus of objects 2]. The calculus supports a key feature of object-oriented languages: an object can be emulated by another object that has more reened methods. Abadi and Cardelli presented four rst-order type systems for the calculus. The simplest one is based on nite types and no subtyping, and the most powerful one has both recursive types and subtyping. Open until now is the question of type inference, and in the presence of subtyping \the absence of minimum typings poses practical problems for type inference" 2]. In this paper we give an O(n 3) algorithm for each of the four type inference problems and we prove that all the problems are P-complete. We also indicate how to modify the algorithms to handle functions and records.
منابع مشابه
Eecient Inference of Partial Types
Partial types for the -calculus were introduced by Thatte in 1988 [8] as a means of typing objects that are not typable with simple types, such as heterogeneous lists and persistent data. In that paper he showed that type inference for partial types was semidecidable. Decidability remained open until quite recently, when O'Keefe and Wand [5] gave an exponential time algorithm for type inference...
متن کاملExtending the Qualitative Trajectory Calculus Based on the Concept of Accessibility of Moving Objects in the Paths
Qualitative spatial representation and reasoning are among the important capabilities in intelligent geospatial information system development. Although a large contribution to the study of moving objects has been attributed to the quantitative use and analysis of data, such calculations are ineffective when there is little inaccurate data on position and geometry or when explicitly explaining ...
متن کاملSubtyping Functional+Nonempty Record Types
Solving systems of subtype constraints (or subtype inequalities) is in the core of eecient type reconstruction in modern object-oriented languages with subtyping and inheritance, two problems known polynomial time equivalent. It is important to know how diierent combinations of type constructors innuence the complexity of the problem. We show the NP-hardness of the satissability problem for sub...
متن کاملTDL--- A Type Description Language for Constraint-Based Grammars
This paper presents TDL, a typed feature-based representation language and inference system. Type deeni-tions in TDL consist of type and feature constraints over the boolean connectives. TDL supports open-and closed-world reasoning over types and allows for partitions and incompatible types. Working with partially as well as with fully expanded types is possible. EEcient reasoning in TDL is acc...
متن کاملFlexible search-based approach for morphological shape decomposition
Mathematical morphology is well-suited to capturing geometric information. Hence, morphology-based approaches have been popular for object shape representation. The two primary morphology-based approaches, the morphological skeleton and the morphological shape decomposition (MSD), each represent an object as a collection of disjoint sets. A practical shape representation scheme, though, should ...
متن کامل